import 'package:flutter/material.dart';
import 'package:flutterapp/utils/navigator_utils.dart';

import 'custom_10_1_combination.dart';
import 'custom_10_2_turn_box.dart';
import 'custom_10_3_custom_paint.dart';
import 'custom_10_4_progress_indicator.dart';

/// @date 2020/08/14  15:46
/// @author 程志强
/// @des

class TenMainRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("自定义组件"),
      ),
      body: Container(
        margin: const EdgeInsets.symmetric(horizontal: 20),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            RaisedButton(
                child: Text("组合现有组件"),
                onPressed: () =>
                    NavigatorUtil.goPageByPush(context, CombinationWidget())),
            RaisedButton(
                child: Text("组合实例：TurnBox"),
                onPressed: () =>
                    NavigatorUtil.goPageByPush(context, TurnBoxRoute())),
            RaisedButton(
                child: Text("自绘组件：CustomPaint"),
                onPressed: () =>
                    NavigatorUtil.goPageByPush(context, CustomPaintRoute())),
            RaisedButton(
                child: Text("自绘实例：圆形背景渐变进度条"),
                onPressed: () =>
                    NavigatorUtil.goPageByPush(context, CustomProgressIndicatorRoute())),
          ],
        ),
      ),
    );
  }
}
